// var bcrypt = require('bcrypt');
var Waterline = require('waterline');

// 实时资金净流入集合
var capitalCollection = Waterline.Collection.extend({
    identity: 'capital',
    connection: 'default',
    attributes: {
        timeStamp: {
            type: 'datetime',
            unique: true,
            required: true
        },
        clockTime: 'string',
        super: 'float',
        huge: 'float',
        big: 'float',
        medium: 'float',
        small: 'float',
        avarage: function() {
            return this.super + this.huge + this.big + this.medium + this.small;
        }
    },
    afterValidate: function(value, cb) {
        
    }
});

module.exports = capitalCollection;